import VueRouter from 'vue-router'
import home from './components/tab/Home.vue'
import cart from './components/tab/Cart.vue'
import member from './components/tab/Member.vue'
import search from './components/tab/Search.vue'
import news from './components/news/news.vue'
import newsContent from './components/news/newsContent.vue'
import photos from './components/photos/photos.vue'
import photoinfo from './components/photos/photoinfo.vue'
import goods from './components/goods/goodsList.vue'
import goodsInfo from './components/goods/goodsInfo.vue'
import GoodsIntroduce from './components/goods/goodsIntroduce.vue'
import GoodsComments from './components/goods/goodsComments.vue'


var router = new VueRouter({
    routes: [{
        path: '/',
        redirect: '/home'
    }, {
        path: '/home',
        component: home
    }, {
        path: '/cart',
        component: cart
    }, {
        path: '/member',
        component: member
    }, {
        path: '/search',
        component: search
    }, {
        path: '/home/news',
        component: news
    }, {
        path: '/home/newsContent/:id',
        component: newsContent
    }, {
        path: '/home/photos',
        component: photos
    }, {
        path: '/home/photoinfo/:id',
        component: photoinfo
    }, {
        path: '/home/goodsList',
        component: goods
    }, {
        path: '/home/goodsInfo/:id',
        component: goodsInfo
    }, {
        path: '/home/goodsIntroduce/:id',
        component: GoodsIntroduce,
        name: 'goodsIntroduce'
    }, {
        path: '/home/goodsComments/:id',
        component: GoodsComments
    }],
    // 切换底部tab栏高亮显示属性
    linkActiveClass: 'mui-active'
})

export default router